<template>
  <q-layout view="hHh Lpr lFr"  class="page-layout rounded-borders bg">
    <MainHeader />
    <div  @click="closeDrawer">
      <q-page-container style="height: 100vh; overflow: hidden;">
        <router-view  />
      </q-page-container>
    </div>
  </q-layout>
  <GnsFooter></GnsFooter>

</template>

<script setup lang="ts">
import MainHeader from 'src/components/MainHeader.vue';
import { useVersionStore } from 'src/stores/versionStore';
import { useHeaderStore } from 'src/stores/headerStore';
import GnsFooter from 'src/components/GnsFooter.vue'
import { useUser } from 'src/stores/userStore';
import { useRouter } from 'vue-router';

const versionStore = useVersionStore();
versionStore.init();

const useHeader = useHeaderStore()

const user = useUser();

const router = useRouter();

if (user.user_id==0){
  router.push({
    name: 'login',
  });
}


function closeDrawer() {
 useHeader.close()
}
</script>

<style scoped> 



.page-layout {
  display: flex;
  justify-content: center;
/*   background: linear-gradient(170.04deg, #FFFFFF 5.35%, #F1F5FF 70.42%, #D3E0FF 96.94%);
 */
}
</style>

<style>
html {
  font-size: 62.5%;
}
</style>